<#include "../base/base.html">
<@layout>
<div class="article-list">
    <div class="category-info">
        <h1>${category.title}</h1>
        <div class="description">${category.description}</div>
    </div>

    <div class="article-items">
        <#list articles as article>
        <div class="article-item">
            <#if article.thumbnail??>
            <div class="thumbnail">
                <img src="${article.thumbnail}" alt="${article.title}">
            </div>
        </#if>
        <div class="content">
            <h2><a href="${article.url}">${article.title}</a></h2>
            <div class="meta">
                <span class="time">${article.publishTime?string('yyyy-MM-dd')}</span>
                <span class="category">${article.categoryName}</span>
            </div>
            <div class="summary">${article.summary}</div>
        </div>
    </div>
</#list>
</div>

<!-- 分页 -->
<#if pages.total gt 1>
<div class="pagination">
    <#list pages.navigatePages as page>
    <a href="?page=${page}" class="${page==pages.current?string('active','')}">${page}</a>
</#list>
</div>
</#if>
</div>
</@layout>
